<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <link href="../../style.css" rel="stylesheet" type="text/css">
    <link rel="icon" href="../../images/PETSc_RGB-logo.png" type="image/png" sizes="16x16">
    <title>PETSc: Documentation: Changes: 3.12</title>
  </head>
  <body>

    <div id="logo">
      <h1>PETSc</h1>
    </div>

    <div id="header">
      <h1><!--begin-->Documentation: Changes: 3.12<!--end--></h1>
    </div>

    <hr>

    <div id="sidebar">
      <ul>
        <li><a href="../../index.html">Home</a></li>
        <li><a href="../../download/index.html">Download</a></li>
        <li><a href="../../features/index.html">Features</a></li>
        <li>
          <a href="../../documentation/index.html">Documentation</a>
          <ul>
            <li><a href="../index.html">Manual pages and Users Manual</a></li>
            <li><a href="../referencing.html">Citing PETSc</a></li>
            <li><a href="../tutorials/index.html">Tutorials</a></li>
            <li><a href="../installation.html">Installation</a></li>
            <li><a href="../saws.html">SAWs</a></li>
            <li>
              <a href="index.html">Changes</a>
              <ul>
                <li><a href="dev.html">dev</a></li>
                <li><a href="313.html">3.13</a></li>
                <li><span class="current">3.12</span></li>
                <li><a href="311.html">3.11</a></li>
                <li><a href="310.html">3.10</a></li>
                <li><a href="39.html">3.9</a></li>
                <li><a href="38.html">3.8</a></li>
                <li><a href="37.html">3.7</a></li>
                <li><a href="36.html">3.6</a></li>
                <li><a href="35.html">3.5</a></li>
                <li><a href="34.html">3.4</a></li>
                <li><a href="33.html">3.3</a></li>
                <li><a href="32.html">3.2</a></li>
                <li><a href="31.html">3.1</a></li>
                <li><a href="300.html">3.0.0</a></li>
                <li><a href="233.html">2.3.3</a></li>
                <li><a href="232.html">2.3.2</a></li>
                <li><a href="231.html">2.3.1</a></li>
                <li><a href="230.html">2.3.0</a></li>
                <li><a href="221.html">2.2.1</a></li>
                <li><a href="220.html">2.2.0</a></li>
                <li><a href="216.html">2.1.6</a></li>
                <li><a href="215.html">2.1.5</a></li>
                <li><a href="213.html">2.1.3</a></li>
                <li><a href="212.html">2.1.2</a></li>
                <li><a href="211.html">2.1.1</a></li>
                <li><a href="21.html">2.1.0</a></li>
                <li><a href="2029.html">2.0.29</a></li>
                <li><a href="2028.html">2.0.28</a></li>
                <li><a href="2024.html">2.0.24</a></li>
                <li><a href="2022.html">2.0.22</a></li>
                <li><a href="2018-21.html">2.0.18-21</a></li>
                <li><a href="2017.html">2.0.17</a></li>
                <li><a href="2016.html">2.0.16</a></li>
                <li><a href="2015.html">2.0.15</a></li>
              </ul>
            </li>
            <li><a href="../bugreporting.html">Bug Reporting</a></li>
            <li><a href="../codemanagement.html">Code Management</a></li>
            <li><a href="../faq.html">FAQ</a></li>
            <li><a href="../license.html">License</a></li>
            <li><a href="../linearsolvertable.html">Linear Solver Table</a></li>
            <li><a href="../nonlinearsolvertable.html">Nonlinear Solver Table</a></li>
	    <li><a href="../taosolvertable.html">TAO Solver Table</a></li>
          </ul>
        </li>
        <li><a href="../../publications/index.html">Applications/Publications</a></li>
        <li><a href="../../miscellaneous/index.html">Miscellaneous</a></li>
        <li><a href="../../miscellaneous/external.html">External Software</a></li>
        <li><a href="https://docs.petsc.org/en/latest/developers/index.html">Developers Site</a></li>
      </ul>
    </div>

    <!--begin-->

    <style type="text/css">
      h2 {
        color: red;
      }

      h4 {
        font-weight: bold;
        text-decoration: underline;
      }
    </style>

    <div id="main">

      <div align="center">
        <h2><a name="CHANGES">CHANGES in the PETSc 3.12 Version</a></h2>
      </div>

      <h4>General:</h4>
      <ul>
          <li>PetscRoundReal() has been removed, since the math routine round() is not supported on all systems: perhaps use PetscCeilReal() or PetscFloorReal()<\li>
          <li>The legacy and cmake compile systems (make all-legacy and all-cmake) are removed</li>
          <li>make gnumake is now make libs</li>
          <li>PetscArraycmp() should be used instead of PetscMemcmp(), it takes a count argument instead of a byte argument</li>
          <li>PetscArraycpy() should be used instead of PetscMemcpy(), it takes a count argument instead of a byte argument</li>
          <li>PetscArrayzero() should be used instead of PetscMemzero(), it takes a count argument instead of a byte argument</li>
          <li>PetscArraymove() should be used instead of PetscMemmove(), it takes a count argument instead of a byte argument</li>
          <li>The ./configure options -with-gnu-compilers and -with-vendor-compilers are removed</li>
          <li>The ./configure option --with-avx512-kernels defaults to true now so the manually optimized AVX-512 kernels are used by default</li>
          <li>The order ./configure tests compilers has changed so there may be a different compiler selected if you do not provide them</li>
          <li>Added --with-64-bit-blas-indices that will switch to 64 bit indices when using MKL libraries for BLAS/LAPACK and build OpenBLAS with this support</li>
          <li>Changed PETSC_DEPRECATED() to PETSC_DEPRECATED_FUNCTION() and PETSC_DEPRECATED_TYPEDEF() to match naming of PETSC_DEPRECATED_ENUM() and PETSC_DEPRECATED_MACRO</li>
          <li>-help now causes the printing of the current value and the newly set value for PetscOptionsInt(), etc</li>
          <li>PetscFunctionListPrintTypes() takes an additional final argument after the current value, the set value</li>
          <li>PetscCalloc*() now calls the system calloc() routine instead of malloc() plus memzero()</li>
          <li>-malloc <yes,no> is now marked as deprecated, use -malloc_debug <yes,no> instead</li>
          <li>-malloc_log and -malloc_log_threshold are now -malloc_view and -malloc_view_threshold</li>
          <li>PetscMallocDebug() is now PetscMallocSetDebug()</li>
          <li>PetscMallocDumpLog() is now PetscMallocView(), see also PetscMallocViewSet()</li>
          <li>PetscMallocSetDumpLogThreshold() and PetscMallocSetDumpLog() are now PetscMallocViewSet()</li>
          <li>With -malloc_test or -malloc_debug allocated memory is initialized with NaN to detect use of uninitialized numerical arrays</li>
          <li>PetscMallocSet() now takes three arguments instead of two</li>
          <li>Moved PetscCUBLASGetHandle() to a separate header file petscublas.h</li>
          <li>Moved VecCUDA*-routines from petsccuda.h into petscvec.h. Removed petsccuda.h</li>
        </ul>
      <h4>Configure/Build:</h4>
      <ul>
          <li>C++ dialect is now auto-detected (C++14 first and then C++11). One can disable this check using --with-cxx-dialect=0, or force it to only check for C++11 using --with-cxx-dialect=C++11</li>
          <li>New option --download-hpddm to enable PCHPDDM and KSPHPDDM</li>
        </ul>
      <h4>IS:</h4>
      <h4>PetscDraw:</h4>
      <h4>PF:</h4>
      <h4>Vec:</h4>
      <ul>
          <li>VecCUDAGet/RestoreArrayReadWrite() changed to VecCUDAGet/RestoreArray()</li>
          <li>VecViennaCLGet/RestoreArrayReadWrite() changed to VecViennaCLGet/RestoreArray()</li>
          <li>Added VecGet/RestoreArray/ReadInPlace() to get array of a vector where it is without copying from GPU to CPU. </li>
        </ul>
      <h4>PetscLayout:</h4>
      <ul>
        <li>Added PetscLayoutCreateFromSizes()</li>
        <li>Added PetscLayoutCreateFromRanges()</li>
        <li>Calling PetscLayoutSetUp() twice with different sizes is now forbidden</li>
      </ul>
      <h4>PetscSection:</h4>
      <h4>VecScatter & PetscSF:</h4>
      <ul>
        <li>The default VecScatter implementation is changed to PetscSF. In other words, the default VecScatter shares PetscSF's MPI communication code. One can use -vecscatter_type mpi1 to go back to the old implementation.</li>
        <li>Added new InsertMode MAX_VALUES and MIN_VALUES support in VecScatterBegin/End and VecGhostUpdateBegin/End. </li>
        <li>PetscSFComputeMultiRootOriginalNumbering: add output argument with the number of multiroots for convenience</li>
        <li>Added an enum type PetscSFPattern for SF graph patterns. Valid values include PETSCSF_PATTERN_ALLGATHER, PETSCSF_PATTERN_GATHER and PETSCSF_PATTERN_ALLTOALL.</li>
        <li>Added PetscSFSetGraphWithPattern() to set SF graphs with predefined patterns.</li>
        <li>Added PetscSFComposeInverse() to compose a new SF by putting the inverse of an SF under the another SF.</li>
        <li>Added MPI-3.0 neighborhood collectives support. One can use command line option -sf_type neighbor to let SF use MPI-3.0 neighborhood collectives for communication instead of the default MPI_Send/Recv.</li>
        <li>PetscSF is now CUDA-aware. The rootdata, leafdata arguments passed to SF routines can be either GPU pointers or CPU pointers. Use a CUDA-aware MPI and option -use_gpu_aware_mpi to enable it.</li>
        <li>VecScatter is also CUDA-aware. You can do VecScatter on CUDA vectors without copying them from GPU to CPU. Again, you need a CUDA-aware MPI and option -use_gpu_aware_mpi.</li>
        <li>Removed PetscSFCreateFromZero. Instead, users should use PetscSFCreate() to create an SF, and then set its graph with PetscSFSetGraphWithPattern(..,PETSCSF_PATTERN_GATHER).</li>
        <li>Renamed PetscSFGetRanks() to PetscSFGetRootRanks().</li>
      </ul>
      <h4>Mat:</h4>
      <ul>
          <li>MatShift(Mat,0); will no longer silently insure there are no missing diagonal entries. (Previously it would put 0 into any diagonal entry that was missing)</li>
          <li>Renamed MatComputeExplicitOperator() into MatComputeOperator() and MatComputeExplicitOperatorTranpose() into MatComputeOperatorTranspose(). Added extra argument to select the desired matrix type</li>
          <li>MatLoad() now supports loading dense matrices from HDF5/MAT files.</li>
          <li>Added new Mat type, MATKAIJ, for matrices that can be expressed in a particular Kronecker (tensor) product form.</li>
          <li>Added MatCompositeSetScalings() to set separate scaling factors for component matrices.</li>
          <li>Added a Boolean option -mat_composite_merge_mvctx to merge Mvctx of component matrices to optimize communication in MatMult() for ADDITIVE matrices. Default is true. </li>
          <li>Added MATSEQDENSECUDA class to use GPUs for dense linear algebra. </li>
        </ul>
      <h4>PC:</h4>
        <ul>
          <li>Renamed PCComputeExplicitOperator() into PCComputeOperator(). Added extra argument to select the desired matrix type</li>
          <li>Added support for PCCHOLESKY with MATSOLVERMUMPS and SBAIJ matrices with bs greater than 1</li>
          <li>Added support for PCLU with MATSOLVERMKL_PARDISO (resp. MATSOLVERMKL_CPARDISO) and SEQBAIJ (resp. MPIBAIJ) matrices</li>
          <li>Added support for PCCHOLESKY with MATSOLVERMKL_PARDISO (resp. MATSOLVERMKL_CPARDISO) and SEQSBAIJ (resp. MPISBAIJ) matrices</li>
          <li>Added new preconditioner PCHPDDM, cf. src/ksp/ksp/examples/tutorials/ex71.c or src/snes/examples/tutorials/ex56.c</li>
        </ul>
      <h4>KSP:</h4>
        <ul>
          <li>Renamed KSPComputeExplicitOperator() into KSPComputeOperator(). Added extra argument to select the desired matrix type</li>
          <li> KSPCGGLTRGetMinEig(KSP,PetscReal*) -> KSPGLTRGetMinEig(KSP,PetscReal*)</li>
          <li> KSPCGGLTRGetLambda(KSP,PetscReal*) ->  KSPGLTRGetLambda(KSP,PetscReal*)</li>
          <li> KSPCGNASH, KSPCGSTCG, KSPCGGLTR -> KSPNASH, KSPSTCG, KSPGLTR</li>
          <li>Added new Krylov solver KSPHPDDM, cf. src/ksp/ksp/examples/tutorials/ex75.c or src/ksp/ksp/examples/tutorials/ex9.c</li>
        </ul>
      <h4>SNES:</h4>
        <ul>
          <li>Changed SNES_CONVERGED_TR_DELTA to SNES_DIVERGED_TR_DELTA with a negative value to indicate diverged, unclear why it was ever positive since tiny trust region would indicate trouble, not converged</li>
        </ul>
        <h4>SNES:</h4>
               <ul>
          <li>-snes_mf no longer turns the preconditioner to none; to use it generally you will also need -pc_type none</li>
        </ul>
      <h4>SNESLineSearch:</h4>
      <h4>TS:</h4>
        <ul>
          <li>Added tangent linear models for Runge-Kutta methods</li>
          <li>Added second-order adjoint solvers based on Runge-Kutta methods and Theta methods</li>
          <li>Improved the usage of first-order adjoint solvers in an optimization context. (The TS object can be reused in the optimization loop)</li>
          <li>Changed the APIs for integrand evaluations and corresponding derivative evaluations. TSSetCostIntegrand() is deprecated. (Instead a quadrature TS is used to handle the callbacks)</li>
          <li>TSTrajectory creates a unique name for folders that store the checkpoint data. Users can rerun adjoint codes without worrying about the folder names, and run multiple codes under the same directory.</li>
          <li>Added support for using finite-differencing (and coloring) to approximate the Jacobians needed by the adjoint solvers. -snes_fd_color can be used for both implicit and explicit methods.</li>
        </ul>
      <h4>DM/DA:</h4>
      <ul>
        <li>Add DMGetLocalSection() to be used in preference to DMGetSection().</li>
        <li>Add DMSetLocalSection() to be used in preference to DMSetSection().</li>
        <li>DMGetDefaultSF() replaced with DMGetSectionSF().</li>
        <li>DMSetDefaultSF() replaced with DMSetSectionSF().</li>
        <li>DMCreateDefaultSF() replaced with DMCreateSectionSF().</li>
        <li>DMAddLabel() now increments the reference count of the DMLabel.</li>
        <li>DMRemoveLabel() now destroys the DMLabel if the output argument is NULL.</li>
        <li>Add DMRemoveLabelBySelf() which looks up the DMLabel by itself, removes from DM and destroys.</li>
      </ul>
      <h4>DMPlex:</h4>
        <ul>
          <li>Rename DMPlexCreateSpectralClosurePermutation() to DMPlexSetClosurePermutationTensor()</li>
          <li>Add DMPlexFindVertices() for vertex coordinates -> DAG point lookup</li>
          <li>Add DMPlexGetOverlap() to get the partition overlap</li>
        </ul>
      <h4>DMNetwork:</h4>
        <ul>
          <li>Changed prototypes for DMNetworkSetSizes()</li>
        </ul>
      <h4>PetscViewer:</h4>
        <ul>
          <li>Removed PetscViewerHDF5{Get,Set}AIJNames() which are likely not really needed</li>
          <li>PetscViewerHDF5SetCollective() and -viewer_hdf5_collective can be used to switch between independent and collective transfer mode. Defaults now to false (independent).
        </ul>
      <h4>SYS:</h4>
        <ul>
          <li>Added PetscCheckDupsInt() to check if a PetscInt array has dups.</li>
          <li>Added an argument to PetscBinaryRead() and PetscBinarySynchronizedRead() to return the number of items read. </li>
        </ul>
      <h4>AO:</h4>
      <h4>Sieve:</h4>
      <h4>Fortran:</h4>
    </div>

    <!--end-->

    <hr>

  </body>
</html>

